-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call mavgen from command line #838
base: master
Are you sure you want to change the base?
Conversation
Your code is set up to call a function
Also, can we get rid of |
@rotu If I knew what I was doing we wouldn't have these problems. I just ran mavgen to the help stage. I'm happy for someone who knows what they are doing to take this on. Mavgen.py doesn't work on Windows? I'm not sure what you mean? I run mavgen on Windows. |
Ha that’s such a familiar feeling to me…
How did you install Python and how do you invoke The console scripts endpoint creates an actual |
@rotu I must have been testing this in a ubuntu VM because as you say, it is not working on Windows - mavgen command is not being found/recognised.
No, the reason we're doing this is to allow mavgen.py to be called from anywhere following installation of pymavlink. That would allow us to build headers from Pymavlink rather than importing Pymavlink as a submodule. |
That's what the new
Currently all the build scripts call it via |
@rotu I wasn't joking when I said I don't know what I'm doing. I'm not sure how to progress from here to a console_script that does what is needed. Going to have to wait until someone with more Python knowledge or more time shows up. |
@peterbarker any objections against this? Does it break anything? |
@julianoes This worked for me on Ubuntu but not on Windows. You should verify that it works for you on the platforms you need. I'd be somewhat OK with including this for your case, except that I worry we'd then get bugs against Windows etc. The approach should be something that can be turned into a working case though. I posted a request for help here too https://discord.com/channels/1022170275984457759/1151306036582551592 PS it should not break anything AFAIK. |
@hamishwillee alright. I'll try it on Windows. |
Ping @julianoes - how did your testing go? |
Thanks for the reminder @peterbarker. @hamishwillee how do you use/test this on Windows? I've never done Python on Windows... |
I can't remember. I''ll have to try this again in two weeks. |
This allows you to call mavgen directly from the command line from anywhere after installing Pymavlink.
note that I don't "know" if this is optimal, or if you have to add
pymavlink.tools
to the packages:Fixes #813
@julianoes For discussion/testing.